-
Notifications
You must be signed in to change notification settings - Fork 13.4k
update to literal-escaper 0.0.4 for better API without unreachable
and faster string parsing
#140999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
7db948b
to
e61a48c
Compare
This comment has been minimized.
This comment has been minimized.
e61a48c
to
774e907
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #141044) made this pull request unmergeable. Please resolve the merge conflicts. |
774e907
to
dfab3b9
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #141595) made this pull request unmergeable. Please resolve the merge conflicts. |
97904bd
to
ba27e2d
Compare
unreachable
unreachable
and faster string parsing
This comment has been minimized.
This comment has been minimized.
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer These commits modify the If this was unintentional then you should revert the changes before this PR is merged. These commits modify the If this was unintentional then you should revert the changes before this PR is merged. Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
Let's run a perf check then. @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
update to literal-escaper 0.0.4 for better API without `unreachable` and faster string parsing This is the replacement for just the part of #138163 dealing with the changed API of unescape functionality, since that got moved into its own crate. This is a draft, because it uses an unpublished version of literal-escaper (rust-lang/literal-escaper#8). To test, clone literal-escaper into a folder next to rustc, and test rustc normally. r? `@nnethercote`
Please file the rust-analyzer parts upstream once it's released, if possible. |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
22cc8f1
to
721cb75
Compare
unreachable
and faster string parsingunreachable
and faster string parsing
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This works locally, but I'm confused about the CI failure, but try build success... |
Well, as long as the benches have been started, all good. :) |
Finished benchmarking commit (8021674): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -6.2%, secondary 2.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 755.253s -> 755.043s (-0.03%) |
721cb75
to
51d292d
Compare
unreachable
and faster string parsingunreachable
and faster string parsing
This comment has been minimized.
This comment has been minimized.
51d292d
to
d2c0815
Compare
This comment has been minimized.
This comment has been minimized.
d2c0815
to
72a6ac8
Compare
This comment has been minimized.
This comment has been minimized.
72a6ac8
to
8bebfc6
Compare
@@ -89,3 +89,6 @@ codegen-units = 1 | |||
# FIXME: LTO cannot be enabled for binaries in a workspace | |||
# <https://github.com/rust-lang/cargo/issues/9330> | |||
# lto = true | |||
|
|||
[patch.crates-io] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but it may be nice to have anyway, like in src/tools/rust-analyzer/Cargo.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? If it's not in use it should not be there. You can leave a comment explaining what to use in case a similar situation happen in the future though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, should be dropped, but I'd prefer these parts to be filed as a PR in the rust-analyzer repo. I don't think it will cause issues except maybe a small, temporary, build slowdown (since it's compiling two versions).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make a difference if I comment out "[patch.crates-io]"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's fine but again: please add an explanation why this is kept around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added an explanatory comment. Let me know if this is okay, or if I should remove the lot.
@lnicola While this is technically possible, I'm not sure how to transplant these changes efficiently. Is there maybe documentation for doing that? Or would it be possible for you to review here? |
I downloaded https://github.com/rust-lang/rust/pull/140999.patch, deleted most of the changes, including the rust-analyzer |
8bebfc6
to
b6a63b5
Compare
# If you want to use a crate with local modifications, you can set a path or git dependency here. | ||
# For git dependencies, also add your source to ALLOWED_SOURCES in src/tools/tidy/src/extdeps.rs. | ||
[patch.crates-io] | ||
# rustc-literal-escaper = { path = '../literal-escaper/' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one can be removed now, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 96?
Given rust-lang/rust-analyzer#20012, can we drop the rust-analyzer parts? |
…and faster string parsing
b6a63b5
to
3ce05f6
Compare
Now without rust-analyzer parts. |
This is the replacement for just the part of #138163 dealing with the changed API of unescape functionality, since that got moved into its own crate.
This uses an unpublished version of literal-escaper (rust-lang/literal-escaper#8).r? @nnethercote